<template>
  <div id="list-nav-bar">
    <nav-bar>
      <div slot="left" class="gohome">
        <el-button @click="goBack">首页</el-button>
      </div>
      <div slot="center" class="title">
        <el-button v-for="(item ,index) in titleList" class="list-item" :key="index">
          {{item.name}}
        </el-button>
      </div>
      <div slot="right" class="user">

      </div>
    </nav-bar>
  </div>
</template>

<script>
import NavBar from './NavBar'
export default {
  name:'ListNavBar',
  data(){
    return{
      sortName:['','',''],
      titleList:[
        {id:1,name:'链表'},
        {id:2,name:'栈'},
        {id:3,name:'队列'},
        {id:4,name:'双向链表'},
        {id:5,name:'双端队列'}
      ]
    }
        
   
  },
  components:{
    NavBar
  },
  methods:{
    goBack(){
      this.$router.push('home')
    }
  }
}
</script>

<style>

</style>